
import java.util.*;
public class CarClient {
	public static void main(String[] args)
	{
		VehicleFactory factory1=VehicleFactory.getVehicleFactory(VehicleFactory.LUXURY_VEHICLE);
		//se obtine o instanta a clasei LuxuryVehicleFactory prin intermediul 
		//clasei abstracte VehicleFactory
		VehicleFactory factory2=VehicleFactory.getVehicleFactory(VehicleFactory.NON_LUXURY_VEHICLE);
		//se obtine o instanta a clasei NonLuxuryVehicleFactory prin intermediul 
		//clasei abstracte VehicleFactory
		ArrayList <Car> cars=new ArrayList();//se creeaza un ArrayList cu vehiculele fabricate
		cars.add(factory1.getCar());
		cars.add(factory2.getCar());
		
		ArrayList <SUV> suvs=new ArrayList();
		suvs.add(factory1.getSUV());
		suvs.add(factory2.getSUV());
		
		System.out.println("The cars are:");
		for(int i=0;i<cars.size();i++)
		{
			System.out.println("Car["+i+"]="+cars.get(i).getCarName()+" "+cars.get(i).getCarFeatures());
		}
		System.out.println("The SUVs are");
		for(int i=0;i<suvs.size();i++)
		{
			System.out.println("SUV["+i+"]="+suvs.get(i).getSUVName()+" "+suvs.get(i).getSUVFeatures());
		}
	}

}
